package com.supplychain.scm.core.delay.listener;

/**
 * @author liyang
 * @version 1.0.0
 * @ClassName DefaultRedissonListenerContainerFactory
 * @createTime 17:17:00 2022/10/14
 */
public class DefaultRedissonListenerContainerFactory implements RedissonListenerContainerFactory {

    @Override
    public RedissonListenerContainer createListenerContainer(ContainerProperties containerProperties) {
        int concurrency = containerProperties.getConcurrency();
        return new ConcurrentRedissonListenerContainer(containerProperties, concurrency <= 1 ? 1 : concurrency);
    }

}
